typedef enum { TYPE_A, TYPE_B } ProductType;

typedef struct {
    void (*operation)();
} Product;

Product* create_product(ProductType type) {
    switch (type) {
        case TYPE_A: return create_product_a(); // 具体实现
        case TYPE_B: return create_product_b();
        default: return NULL;
    }
}